<script type="text/javascript" src="<?=MY_URL?>/html/scripts/plugin/jquery.lightbox-0.5.pack.js"></script>

<link rel="stylesheet" type="text/css" href="<?=MY_URL?>/html/styles/shop/shop_item.css" media="screen" />

<link rel="stylesheet" type="text/css" href="<?=MY_URL?>/html/styles/plugin/jquery.lightbox-0.5.css" />
<div class="product">
		<div class="producttitle">&nbsp;<script type="text/javascript">FlashObject("<?=MY_URL?>/html/styles_2010_01/text.swf?str=<?=$this->itemDetailArray[0]['en_flname']?>", 500, 57, "", "");</script></div>
		<div class="producttitleShadowleft"></div>
  <div class="producttitleShadow"></div>
<ul class="coubAlList">
		<li><a href="<?=MY_URL?>">Home</a>>><a href="#"><?=$this->parentArray[count($this->parentArray)-2]?></a>>><a href="#"><?=$this->parentArray[count($this->parentArray)-1]?></a></li>
		</ul>
<div id="rightBody" >
		<div class="product_Item">

			<div class="productShow">

				<div class="bigCutPhoto"><img src="<?=MY_URL?>/<?=$this->itemDetailArray[0]['cut_url']?>" /></div>				

				<div id="gallery">

					<?foreach($this->attachmentArray as $value):?>

					<div class="productImgsDiv"><a href="<?=MY_URL?>/<?=$value['attachment_url']?>"><img src="<?=MY_URL?>/<?=$value['cut_url']?>" alt="<?=$value['intro']?>" /></a></div>

					<?endforeach;?>

				</div>	

			</div><!--productShow-->

		    	

			<div class="productDetail">
             <div class="prodtctboxlinetop"></div>
			<div class="productinfobox">
				<h1><?=$this->itemDetailArray[0]['subject']?> </h1>
			   <?if($this->itemDetailArray[0]['product_sponsors']):?>
               <div class="details"><img src="<?=MY_URL?>/<?=$this->itemDetailArray[0]['product_sponsors']?>" align="absmiddle" /> Type of Brand Logo：<?=$this->itemDetailArray[0]['product_brandlogo']?></div>
			   <?endif;?>
			   <?if($this->itemDetailArray[0]['product_teambadge']):?>
               <div class="details"> Type of Team Badge：<?=$this->itemDetailArray[0]['product_teambadge']?></div>
			   <?endif;?>
				<div class="details"><strong>ID:</strong> <?=$this->itemDetailArray[0]['itemid']?>&nbsp;&nbsp;&nbsp;&nbsp;
				<strong>Catalog:</strong> <a href="<?=MY_URL?>/category-detail-cid-<?=$this->itemDetailArray[0]['flid']?>/<?=$this->encodeName($this->itemDetailArray[0]['en_flname'])?>/"><?=$this->itemDetailArray[0]['en_flname']?></a>&nbsp;&nbsp;&nbsp;&nbsp;
				
				<a onClick="myFavorite.addItemFavor('<?=$this->itemDetailArray[0]['itemid']?>');"><img src="<?=MY_URL?>/html/styles_2010_01/images/favor.jpg" align="absmiddle" />&nbsp;&nbsp;Add to my favorite</a></div>

				<?if($this->itemDetailArray[0]['min_price']!=$this->itemDetailArray[0]['max_price']):?>

                                <div class="details">Price: <span onMouseOut="document.getElementById('qpdiv').style.display='none'" onMouseMove="document.getElementById('qpdiv').style.display=''">$<?=$this->itemDetailArray[0]['min_price']?> - $<?=$this->itemDetailArray[0]['max_price']?>

<div class="qpdiv" id="qpdiv" style="display:none">

<table width="100%" border="0" cellpadding="0" cellspacing="0">

  <tr>

    <td>Quantity</td>

    <td>Price</td>

    <td>Pic</td>

  </tr>



  <?foreach($this->priceArray as $value):?>

    <tr>

    <td><?=$value['min_counts']?> - <?=$value['max_counts']?></td>

    <td>$<?=$value['net_price']?></td>

    <td>€<?=$value['net_price']*EXCHANGE_RATE?></td>

  </tr>

 <?endforeach;?>

</table>

</div>

                                            </span>

					       &nbsp; &nbsp;&nbsp; (Quantity Price Pic)

					</div>

				<?else:?>

					<div class="details">Price: <span><?=$this->itemDetailArray[0]['min_price']?></span>

					      &nbsp; &nbsp;&nbsp; (Quantity Price Pic)

				    </div>

				<?endif;?>

				

				<!--<div class="details">Please input the quantity which size you need and chick "<span>add to cart</span>" </div>-->

			    

			<div class="clearthis">.</div>

			<!--�����?-->

			<div class="buySelectForm">

				<form action="<?=MY_URL?>/product-addtocart" method="post" onSubmit="return checkForm();">	

				<div>			    

					<div class="buySelectRight">

						<div style="float:left;">

						    <p><strong>Quantity:</strong></p>

						    <p>Price(USD):</p>

							<p>Price(EUR):</p>

						</div>					

						<?foreach($this->priceArray as $value):?>

						<div style="float:left;">

							<p><strong><?=$value['min_counts']?> - <?=$value['max_counts']?></strong></p>

							<p><span>$<?=$value['net_price']?></span></p>

                                                        <p><span>€<?=$value['net_price']*EXCHANGE_RATE?></span></p>

							<input type="hidden" name="min_counts[]" value="<?=$value['min_counts']?>" />

							<input type="hidden" name="max_counts[]" value="<?=$value['max_counts']?>" />						

						</div>

						<?endforeach;?>							

					</div><!--buySelectRight-->

					<div class="clearthis">.</div>

					<div style="margin-bottom:10px;">* If you combine different jerseys with different teams, 
                        <br />                      we will also offer you this discount.. </div>

								

					<div class="buySelectLeft">					    												

						<div style="float:left;">

						    <p><strong>Size:</strong></p>

						    <p>Quantity:</p>

						</div>					

						<?foreach($this->pattern_size as $value):?>

						<div style="float:left;">

							<p>&nbsp;&nbsp;&nbsp;<?=$value?><input type="hidden" value="<?=$value?>" name="pattern_size[]" /></p>

							<p><input name="counts[]" type="text" value="0" /></p>							

						</div>

						<?endforeach;?>				

						<input type="hidden" name="pattern_name" value="<?=$this->priceArray[0]['pattern_name']?>" />

						<input type="hidden" name="itemid" value="<?=$this->itemid?>" />

							
<div id="sizepic">
    <?if($this->fuitemDetailArray[0]['sizepicurl']):?>
    <img src="<?=MY_URL?>/<?=$this->fuitemDetailArray[0]['sizepicurl']?>" width="457" height="70" border="0" align="absmiddle" />
    <?else:?>
    <img src="<?=MY_URL?>/html/styles_2010_01/images/jerseybbs_team_product1_26.jpg" width="457" height="70" border="0" align="absmiddle" />
    <?endif;?>
</div>
					</div><!--buySelectLeft-->

					<div style="clear:both;"></div>

					<div class="printnum">
					<div class="badgepatch" align="left">
           <?if($this->fuitemDetailArray[0]['badgepatch']):?>
                                            Badge Patch? &nbsp;&nbsp;&nbsp;

						<label>Yes</label>

						<input type="radio" name="BadgePatch" value="Yes" style="border:none;" />

						<label>No</label>

                                                <input type="radio" name="BadgePatch" value="NO" checked="checked"/>

                                                <br />
                                                <?else:?>
                                               <input type="radio" name="BadgePatch" value="NO" checked="checked" style="display:none;" /> <br />

       <?endif;?>
       <?if($this->fuitemDetailArray[0]['Printnumber']):?>
						Print name and number? &nbsp;&nbsp;&nbsp;

						<label for="addNameNum1">Yes</label> 

						<input type="radio" name="addNameNum" id="addNameNum1" value="1" style="border:none;" />                        

						<label for="addNameNum2">No</label> 

						<input type="radio" name="addNameNum" id="addNameNum2" value="0" style="border:none;" />	
 <?else:?>
    <input type="radio" name="addNameNum" id="addNameNum2" checked="checked" value="0" style="display:none;" />                                             <br />
  <?endif;?>
						</div>					

						<div style="display:none" id="nameNumDiv">

							<div>If the print name or number is the same, please fill in the input as follow:<br />&nbsp;&nbsp;

							     Name:<input type="text" class="shirtPrintDetail" name="shirtName" onkeyup='this.value=this.value.replace(/[^0-9a-zA-Z@_\-!#$%():;,.? ]+/,"");' />&nbsp;&nbsp;

							     Number:<input type="text" class="shirtPrintDetail" name="shirtNum" onkeyup='this.value=this.value.replace(/[^0-9a-zA-Z@_\-!#$%():;,.? ]+/,"");' />

							</div>

							<div>If the print name or number is different from each shirt, please leave your message here:<br />                                (e.g:5 shirt print the name "aaa" and number "111",6 shirt print the name "bbb" and number "222".)

								<br />&nbsp;&nbsp;

								<textarea name="printMesg" onkeyup='this.value=this.value.replace(/[^0-9a-zA-Z@_\-!#$%():;,.? ]+/,"");' class="shirtPrintDetail" style="border: 1px solid #999999;width:270px;height:100px" ></textarea>

							</div>

							<div>

								The amounts of the shirt you want to print: 

								<select name="printAmounts">

									<option value="0">0</option>

								</select>

							</div>

							<div>$2 plus each shirt</div>

						</div>
						<div class="addToCartDiv"><input type="image" src="<?=MY_URL?>/html/styles_2010_01/images/addtocart.jpg" /><a href="#;"><img src="<?=MY_URL?>/html/styles_2010_01/images/eliminate.jpg"/></a></div>						

					</div><!--printnum-->			     

			 	</div>

				<div style="clear:both;"></div>

					

				</form>

			</div>

			</div>
<div class="prodtctboxlinedow"></div>
			</div><!--productDetail-->
<!--productinfo -->
<div style="clear:both;"></div>
<div id="productinfodiv">
<div class="butlist">
<div class="leftdiv"><a href="javascript:setinfobox('1','pay');" onclick="javascript:setinfobox('1','pay');" id="bu1"><span>Payment Datails</span></a></div>
<div class="muldudiv"><a href="javascript:setinfobox('2','desc');" id="bu2"><span>Description</span></a></div>
<div class="muldudiv"><a href="javascript:setinfobox('3','Shipment');" id="bu3"><span>Shipment</span></a></div>
<div class="muldudiv"><a href="javascript:setinfobox('4','Exchnge');" id="bu4"><span>Exchnge &amp; Return</span></a></div>
<div class="rightdiv"><a href="javascript:setinfobox('5','History');" id="bu5"><span>History</span></a></div>
</div>
<div class="infoboxtop">
  <div class="infoboxdow">
    <div class="infobox" id="infotext">&nbsp;</div>
  </div>
</div>

<div id="pay" style="display:none">
<img src="<?=MY_URL?>/html/styles_2010_01/images/pay.jpg"/>
</div>
<div id="desc" style="display:none">
<img src="<?=MY_URL?>/html/styles_2010_01/images/desc.jpg"/>
<p>
<?=$this->itemDetailArray[0]['pattern_intro']?>
</p>
<p><?=$this->itemDetailArray[0]['content']?></p>
</div>
<div id="Shipment" style="display:none">
<img src="<?=MY_URL?>/html/styles_2010_01/images/shipment.jpg"/>
</div>
<div id="Exchnge" style="display:none">
<img src="<?=MY_URL?>/html/styles_2010_01/images/exchnge.jpg"/>
<p>
Items must be returned within: <br />
30 Days <br />
Refund will be given as:<br />
 Money Back <br />
Return policy details:<br />
 All return must be made in 30 days and in New Condition. The shipping charge is none refundable. <br />
</p>
</div>
<div id="History" style="display:none">
<img src="<?=MY_URL?>/html/styles_2010_01/images/history.jpg"/>
<?=$this->itemDetailArray[0]['flbody']?>
</div>
<script type="text/javascript">
function setinfobox(o,txtbox){
for(i=1;i<6;i++)
{
document.getElementById('bu'+i).className = "" ;
}

document.getElementById('bu'+o).className = "hots" ;

document.getElementById("infotext").innerHTML=document.getElementById(txtbox).innerHTML;
}
setinfobox('1','pay');
</script>
</div>

<!--productinfo end -->
   <div style="clear:both;"></div>
<div class="alsolikediv">
 <div class="alsolikebox">
		                   <ul class="alsolikproductList">

                               <?foreach($this->interrelatedArray as $value2):?>

						       <li>

							       <div class="imgdiv">

							            <a href="<?=MY_URL?>/product-detail-id-<?=$value2['itemid']?>/<?=$this->encodeName($value2['subject'])?>/" target="_blank">

										<img src="<?=MY_URL?>/<?=$value2['cut_url']?>" />

										</a>

							            <div class="cloths_name">

										     <a href="<?=MY_URL?>/product-detail-id-<?=$value2['itemid']?>/<?=$this->encodeName($value2['subject'])?>/" target="_blank"><span><?=$value2['subject']?></span></a></div>

							            <?if($value2['min_price']!=$value2[0]['max_price']):?>

								        <div class="productPrice">$ <?=$value2['min_price']?> - <?=$value2['max_price']?> </div>

							            <?else:?>

								        <div class="productPrice">$ <?=$value2['max_price']?> </div>

							            <?endif;?>

							            

							       </div>

						      </li>

						      <?endforeach;?>



					       </ul>

</div>
</div>
			
		</div>

	</div>

</div>











    
<script>

$('#gallery a').lightBox({

	overlayOpacity: 0.6,

	imageLoading: '<?=ROOT_PATH?>/html/images/box/loading.gif',

	imageBtnClose: '<?=ROOT_PATH?>/html/images/box/close.gif',

	imageBtnPrev: '<?=ROOT_PATH?>/html/images/box/prev.gif',

	imageBtnNext: '<?=ROOT_PATH?>/html/images/box/next.gif',

	txtImage: 'Product images'

	}

)

function checkForm(){

	var minArray=$('input[name="min_counts[]"]');

	var maxArray=$('input[name="max_counts[]"]');

	var counts=0;

	var isTrue=true;;

	$('input[name="counts[]"]').each(

		function(){

			if(!numTest($(this).val())){

				isTrue=false;

			}else{

				counts+=parseInt($(this).val());

			}

		}

	);

	if(!isTrue){

		alert("Please enter the correct quantity you want to buy!");

		return false;

	}



	if(counts<parseInt($(minArray[0]).val())){

		alert("The quantity you entered is too few!");

		return false;

	}

	if(counts>parseInt($(maxArray[maxArray.size()-1]).val())){

		alert("The quantity you entered is too many!");

		return false;

	}

	var checkedNameNum=false;

	$('input[name="addNameNum"]').each(

		function(){

			if($(this).attr("checked")==true){

				checkedNameNum=true;

			}

		}

	);

	if(!checkedNameNum){

		alert("Please choose whether you want to print the name or number on the shirt!");

		return false;

	}


	var checkedBadgePatch=false;

	$('input[name="BadgePatch"]').each(

		function(){

			if($(this).attr("checked")==true){

				checkedBadgePatch=true;

			}

		}

	);

	if(!checkedBadgePatch){

		alert("Please choose whether you Badge Patch!");

		return false;

	}



	if($('#addNameNum1').attr('checked')){

		if($('input[name="shirtName"]').val()==''&&$('input[name="shirtNum"]').val()==''&&$('textarea[name="printMesg"]').val()==''){

			alert("Please input the shirt name or the shirt number you want to print!");

			return false;

		}

	}

	

	return true;

}

$('#addNameNum1').click(

	function (){

		$('#nameNumDiv').show();

	}

);

$('#addNameNum2').click(

	function (){

		$('#nameNumDiv').hide();

	}

);

$('input[name="counts[]"]').blur(

	function(){

		var counts=0;

		$('input[name="counts[]"]').each(

			function(){

				if(!numTest($(this).val())){

					isTrue=false;

				}else{

					counts+=parseInt($(this).val());

				}

			}

		);

		var minArray=$('input[name="min_counts[]"]');

		var maxArray=$('input[name="max_counts[]"]');

		if(counts<parseInt($(minArray[0]).val())){

			counts=parseInt($(minArray[0]).val());

		}

		if(counts>parseInt($(maxArray[maxArray.size()-1]).val())){

			counts=parseInt($(maxArray[maxArray.size()-1]).val());

		}

		$('select[name="printAmounts"]').children().each(

			function(){

				$(this).remove();

			}

		);

		for(var i=1;i<counts+1;i++){
                        if(i==counts)
                            {
                                   $('select[name="printAmounts"]').append('<option value="'+i+'" selected="selected">'+i+'</option>');
                            }else
                            {
                                    $('select[name="printAmounts"]').append('<option value="'+i+'">'+i+'</option>');
                            }
			

		}

	}

);





userPannel.show();



</script>

